<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/CampHouseSell.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/CampHouseSell.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'id',
                    footer: "Foots",
                    cnName: '营房售卖',
                    name: 'CampHouseSell',
                    url: "/CampHouseSell/",
                    sortName: "id"
                },
                extend: extend,
                editFormFields: {name:"",typeId:"",parentId:"",dayNum:"",unitId:"",Price:"",openDate:""},
                editFormOptions: [
                    [
                        {"title":"名称","required":true,"field":"name","type":"text"},
                        {"title":"单位列表","required":true,"field":"unitId","type":"select",dataKey:'',data: []},
                        {"title":"营房类型","required":true,"field":"parentId","type":"select",dataKey:'CampsiteHouseType',data: []},
                    ],
                    [
                        {"title":"营位类型","required":true,"field":"typeId","type":"select",dataKey:'',data: []},
                        { "title": "开放时间", "field": "openDate", "type": "is-range", "range": true },
                        {"title":"单价","required":true,"field":"Price","type":"number"},
                    ],
                    [
                        {"title":"是否跨天","field":"dayNum","type":"switch"},
                    ],
                ],
                searchFormFields: {name:"",typeId:"",parentId:""},
                searchFormOptions: [
                    [
                        {"title":"名称","required":true,"field":"name","type":"like"},
                        {"title":"营房类型","required":true,"field":"parentId","type":"text"},
                        {"title":"营位类型","required":true,"field":"typeId","type":"text"},
                    ],
                ],
                columns: [
                    // {field:'id',title:'id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                    //    {field:'uid',title:'guid',type:'string',width:220,align:'left',sortable:true},
                       {field:'name',title:'名称',type:'int',width:90,align:'left'},
                       {field:'parentId',title:'营房类型',type:'int',width:90,align:'left',bind: { key: 'CampsiteHouseType', data: [] }},
                    //    {field:'typeId',title:'营位类型',type:'int',width:90,align:'left'},
                       {field:'typeName',title:'营位类型',type:'string',width:120,align:'left'},
                       {field:'startTime',title:'开始时间',type:'string',width:120,align:'left'},
                       {field:'endTime',title:'结束时间',type:'string',width:120,align:'left'},
                       {field:'Price',title:'单价',type:'Price',width:60,align:'left'},
                       {field:'unitId',title:'单位',type:'int',width:100,align:'left',bind:{ key:'unitIdList',data:[]}},
                    //    {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
                    //    {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:120,align:'left'},
                    //    {field:'createID',title:'创建人id',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:190,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:120,align:'left'},
                    //    {field:'modifyID',title:'修改人id',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:190,align:'left',sortable:true}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
